.ct-tooltip {
  --ct-popover-bg-color: var(--ct-bg-color);
  --ct-popover-font-size: var(--ct-font-size-base);
  --ct-popover-border-color: var(--ct-border-color-dark);
  --ct-popover-padding: 12px;
  --ct-popover-border-radius: var(--ct-border-radius-base);
  display: inline-block;
}

.ct-tooltip {
  .ct-tooltip__popper {
    background: var(--ct-popover-bg-color);
    border-radius: var(--ct-popover-border-radius);
    border: var(--ct-popover-border-color);
    padding: var(--ct-popover-padding);
    color: var(--ct-text-color-regular);
    line-height: 1.4;
    text-align: justify;
    font-size: var(--ct-popover-font-size);
    box-shadow: var(--ct-box-shadow-light);
    word-break: break-all;
    box-sizing: border-box;
    z-index: 1000;
    position: relative;

    #arrow,
    #arrow::before {
      position: absolute;
      width: 8px;
      height: 8px;
      background-color: var(--ct-popover-bg-color);
      box-sizing: border-box;
    }
  }
  #arrow {
    visibility: hidden;
  }
  #arrow::before {
    content: '';
    visibility: visible;
    transform: rotate(45deg);
  }
  [data-popper-placement^='top'] > #arrow {
    bottom: -5px;
  }
  [data-popper-placement^='bottom'] > #arrow {
    top: -5px;
  }
  [data-popper-placement^='left'] > #arrow {
    right: -5px;
  }
  [data-popper-placement^='right'] > #arrow {
    left: -5px;
  }
  &[data-popper-placement^='top'] > #arrow::before {
    border-right: var(--ct-popover-border-color);
    border-bottom: var(--ct-popover-border-color);
  }
  &[data-popper-placement^='bottom'] > #arrow::before {
    border-left: var(--ct-popover-border-color);
    border-top: var(--ct-popover-border-color);
  }
  &[data-popper-placement^='left'] > #arrow::before {
    border-right: var(--ct-popover-border-color);
    border-top: var(--ct-popover-border-color);
  }
  &[data-popper-placement^='right'] > #arrow::before {
    border-left: var(--ct-popover-border-color);
    border-bottom: var(--ct-popover-border-color);
  }

  .fade-enter,
  .fade-leave {
    opacity: 1;
  }

  .fade-enter-active,
  .fade-leave-active {
    transition: opacity var(--ct-transition-duration) ease-in-out;
  }

  .fade-enter-from,
  .fade-leave-to {
    opacity: 0;
  }
}
